<template>
  <span>{{dValue}}</span>
</template>

<script setup name="dateFormat">
import dayjs from 'dayjs'
import {computed, defineProps} from 'vue'

let props = defineProps({
  value: { type: Number, default: 0 },
  format: { type: String, default: 'YYYY-MM-DD' },
})
const dValue = computed(()=>{
  return dayjs(props.value).format(props.format)
})
</script>
